
#ifndef NODEPANEL_H
#define NODEPANEL_H

#include <BGroupBox>
#include <BButton>
#include <BLineEdit>
#include <BRealSpinBox>
#include <BComboBox>
#include <BSpinBox>
#include <BButton>
#include <BCheckBox>
#include <BNode>

using namespace BWE;

class NodePanel : public BGroupBox
{
	BOBJECT(NodePanel)
public:
	NodePanel(BWidget* parent = 0);
	~NodePanel();

protected:
	void freshPhysics();

protected:
	void slotAssetChanged();
	void slotPhysicsButtonClicked(BObject* object);
	void slotPhysicsButtonAssetChanged(BObject* object);

	void slotVisibleToggled(BObject* object, const BValue& value);
	void slotOptimizedToggled(BObject* object, const BValue& value);

	void slotNameEdited(BObject* object, const BValue& value);
	void slotMassEditFinished(BObject* object, const BValue& value);
	void slotGravityEditFinished(BObject* object, const BValue& value);
	void slotFrictionEditFinished(BObject* object, const BValue& value);
	void slotElastanceEditFinished(BObject* object, const BValue& value);
	void slotForceEditFinished(BObject* object, const BValue& value);
	void slotVelocityEditFinished(BObject* object, const BValue& value);
	void slotRotationEditFinished(BObject* object, const BValue& value);

protected:
	virtual void styleEvent(const BEvent& event);

private:
	BNode*			_node;
	BButton*		_insertButton;
	BButton*		_physicsButton;
	BCheckBox*		_visibleCheckBox;
	BCheckBox*		_optimizedCheckBox;

	BGroupBox*		_physicsGroupBox;
	BLineEdit*		_nameEdit;
	BRealSpinBox*	_massSpinBox;
	BLineEdit*		_gravityEdit;
	BRealSpinBox*	_frictionSpinBox;
	BRealSpinBox*	_elastaneSpinBox;
	BLineEdit*		_forceEdit;
	BLineEdit*		_velocityEdit;
	BLineEdit*		_rotationEdit;

};

#endif
